package com.qq.weixin.mp.message.hxexp.model.send;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import com.hxexp.weixin.common.jaxb.CDATAAdapter;

/**
 * 回复消息基类
 * @author li.jiang
 *
 */
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class BaseReplyJaxb implements Serializable {

    private static final long serialVersionUID = 2672230207984374318L;
    /**
     * 接收方帐号（收到的OpenID）
     */
    @XmlElement(name = "ToUserName")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String toUserName;
    /**
     * 开发者微信号
     */
    @XmlElement(name = "FromUserName")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String fromUserName;
    /**
     * 消息创建时间 （整型）
     */
    @XmlElement(name = "CreateTime")
    private long createTime;
    /**
     * 消息类型，文本消息为text
     */
    @XmlElement(name = "MsgType")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String msgType;
    /**
     * 回复消息基类构造函数
     */
    public BaseReplyJaxb() {
    }
    /**
     * @return the toUserName
     */
    public String getToUserName() {
        return toUserName;
    }
    /**
     * @param toUserName the toUserName to set
     */
    public void setToUserName(String toUserName) {
        this.toUserName = toUserName;
    }
    /**
     * @return the fromUserName
     */
    public String getFromUserName() {
        return fromUserName;
    }
    /**
     * @param fromUserName the fromUserName to set
     */
    public void setFromUserName(String fromUserName) {
        this.fromUserName = fromUserName;
    }
    /**
     * @return the createTime
     */
    public long getCreateTime() {
        return createTime;
    }
    /**
     * @param createTime the createTime to set
     */
    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }
    /**
     * @return the msgType
     */
    public String getMsgType() {
        return msgType;
    }
    /**
     * @param msgType the msgType to set
     */
    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }
    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "BaseReplyJaxb [toUserName=" + toUserName + ", fromUserName=" + fromUserName + ", createTime="
                + createTime + ", msgType=" + msgType + "]";
    }
}
